<template>
    <div id="Payeraddress">
        <v-detail :detailData="inputData" :inputConfig="inputConfig" :rules="rules" ref="detail"></v-detail>
    </div>
</template>

<script>
import detail from "commons/Detail";
import baseMixin from "@/mixins/BaseMixin";

export default {
    name: "Payeraddress",
    mixins: [baseMixin],
    props: {
        inputData: {
            type: Object
        }
    },
    data() {
        return {
            whseidflag: false,
            rules: {},
        }
    },
    computed: {
        inputConfig() {
            return [
                [
                    {
                        type: "input",
                        label: this.$t('config.address',{no:'1'}),
                        props: "b_Address1",
                        disabled: this.whseidflag
                    },
                    {
                        type: "input",
                        label: this.$t('config.address',{no:'2'}),
                        props: "b_Address2",
                        disabled: this.whseidflag
                    },
                    {
                        type: "input",
                        label: this.$t('config.address',{no:'3'}),
                        props: "b_Address3",
                        disabled: this.whseidflag
                    },
                    {
                        type: "input",
                        label: this.$t('config.address',{no:'4'}),
                        props: "b_Address4",
                        disabled: this.whseidflag
                    },
                ],
                [
                    {
                        type: "input",
                        label: this.$t('bill.country'),
                        props: "b_Country",
                        disabled: this.whseidflag
                    },
                    {
                        type: "select",
                        label: this.$t('bill.countryCode'),
                        props: "b_Isocntrycode",
                        options: this.getOptions('querycodeLkup/ISOCOUNTRY'),
                        disabled: this.whseidflag
                    },
                    {
                        type: "input",
                        label: this.$t('config.city'),
                        props: "b_City",
                        disabled: this.whseidflag
                    },
                    {
                        type: "input",
                        label: this.$t('config.provice'),
                        props: "b_State",
                        disabled: this.whseidflag
                    },
                    {
                        type: "input",
                        label: this.$t('config.postcode'),
                        props: "b_Zip",
                        disabled: this.whseidflag
                    },
                ],
                [
                    {
                        type: "input",
                        label: this.$t('config.contract',{no:"#1"}),
                        props: "b_Contact1",
                        disabled: this.whseidflag
                    },
                    {
                        type: "input",
                        label: this.$t('config.contractPhone',{no:"1"}),
                        props: "b_Phone1",
                        disabled: this.whseidflag
                    },
                    {
                        type: "input",
                        label: this.$t('config.contractFax',{no:"1"}),
                        props: "b_Fax1",
                        disabled: this.whseidflag
                    },
                    {
                        type: "input",
                        label: this.$t('config.contractFax',{no:"1"}),
                        props: "b_Email1",
                        disabled: this.whseidflag
                    },
                ],
                [
                    {
                        type: "input",
                        label: this.$t('config.contract',{no:"#2"}),
                        props: "b_Contact2",
                        disabled: this.whseidflag
                    },
                    {
                        type: "input",
                        label: this.$t('config.contractPhone',{no:"2"}),
                        props: "b_Phone2",
                        disabled: this.whseidflag
                    },
                    {
                        type: "input",
                        label: this.$t('config.contractFax',{no:"2"}),
                        props: "b_Fax2",
                        disabled: this.whseidflag
                    },
                    {
                        type: "input",
                        label: this.$t('config.contractFax',{no:"2"}),
                        props: "b_Email2",
                        disabled: this.whseidflag
                    }
                ]
            ]
        }
    },
    methods: {},
    mounted() {
        if (this.$store.state.wms.toUpperCase().includes('WMWHSE')) {
            //仓库级
            this.whseidflag = true;
        }
    },
    components: {
        "v-detail": detail
    }
}
</script>

<style scoped>

</style>
